import request from '@/utils/request'

// 新增或修改时间池
export function addTimePool(data) {
    return request({
      url: '/TimePool/addTimePool',
      method: 'post',
      data: data,
      headers: {
        'Content-Type': 'multipart/form-data'
      }
    })
  }

// 查询时间池
export function listTimepool(query) {
    return request({
      url: '/TimePool/selectTimePool',
      method: 'get',
      params: query
    })
  }

  //修改时间池状态
  export function updateTimePool(id,status) {
    const data = {
      id,
      status,
    }
    return request({
      url: '/TimePool/updateTimePoolStatus',
      method: 'post',
      data: data
    })
  }

  //时间池删除
  export function delTimePool(id) {
    return request({
      url: '/TimePool/' + id,
      method: 'delete'
    })
  }